import React, { Component } from "react";
import { Layout } from "antd";
import SiderBarComponent from "./SiderBarComponent";
import HeaderComponent from "./HeaderComponent";
import ContentComponent from "./ContentComponent";
import FooterComponent from "./FooterComponent";
import "./Home.less";
import { HomeConnect } from "./HomeRedux";

class Home extends Component {
  render() {
    const {
      collapsed,
      contentTabPanes,
      toggle,
      addTab,
      activeTabKey,
      onTabClick,
      onTabClose
    } = this.props;
    return (
      <Layout>
        <SiderBarComponent collapsed={collapsed} addTab={addTab} />

        <Layout>
          <HeaderComponent collapsed={collapsed} toggle={toggle} />

          <ContentComponent
            contentTabPanes={contentTabPanes}
            activeTabKey={activeTabKey}
            onTabClick={onTabClick}
            onTabClose={onTabClose}
          />
          <FooterComponent />
        </Layout>
      </Layout>
    );
  }
}

export default HomeConnect(Home);
